using FytSoa.Domain.Core.Result;
using System.Threading.Tasks;
using FytSoa.Domain.Core.Param;
using System.Collections.Generic;

namespace FytSoa.Application.Sys;

/// <summary>
/// 服务接口
/// </summary>
public interface ISysMenuService:IApplicationService
{
    /// <summary>
    /// 查询所有——分页
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<PageResult<SysMenuDto>>> GetPagesAsync (PageParam param);

    /// <summary>
    /// 查询所有
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<List<SysMenuDto>>> GetListAsync(WhereParam param);
    
    /// <summary>
    /// 根据主键查询
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<SysMenuDto>> GetAsync (long id);

    /// <summary>
    /// 添加
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<bool>> AddAsync (SysMenuDto model);
    
    /// <summary>
    /// 添加-临时=未命名
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<SysMenuDto>> AddTempAsync (SysMenuTempParam model);

    /// <summary>
    /// 修改
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<bool>> ModifyAsync (SysMenuDto model);
    
    /// <summary>
    /// 拖动节点排序
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<bool>> ModifyDraggingAsync (SysMenuDropDto model);

    /// <summary>
    /// 删除-支持多个删除，逗号分隔
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<bool>> DeleteAsync (string ids);
    
    /// <summary>
    /// 自定义排序
    /// </summary>
    /// <param name="param"></param>
    /// <returns></returns>
    Task<ApiResult<int>> ColSort (SortParam param);
    
    /// <summary>
    /// 根据登录人ID查询权限菜单
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<List<AuthorityDto>>> GetAuthorityAsync();
    
    /// <summary>
    /// 根据登录人ID查询权限菜单[SCUI]
    /// </summary>
    /// <returns></returns>
    Task<ApiResult<List<AuthorityDto>>> GetAuthorityMenuAsync(long id);
}
